home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / dev / asm / Tandem.lha / Tandem / Teaching / 6.asm < prev    next >
Encoding:
Assembly Source File  |  1999-08-21  |  320 b   |  8 lines

  1. * 6.asm   Demonstration of pushing and popping    version 0.00   1.9.97
  2.  
  3.  move.l #$12345678,d0  ;let D0=$12345678     (A7level =1)
  4.  move.l d0,-(a7)       ;push D0 to the stack (causes A7level=2)
  5.  move.l #$87654321,d0  ;give D0 a new value
  6.  move.l (a7)+,d0       ;pop the pushed value back to D0 (A7level back to 1)
  7.  rts
  8.